<template>
  <div>
    <TbTitle level="2" title="（二）、从业人员情况" />
    <table class="m-table-pdf" border="0">
      <tr>
        <td class="td-head" rowspan=" 14"> 单位从业人员情况</td>
      </tr>
      <tr>
        <td colspan="2">
          负责人数：
          <span>{{ detailInfo.responsiblePeopleNum }}</span>
          人
        </td>
        <td colspan="8">
          其中：女性：
          <span>{{ detailInfo.responsiblePeopleWomanNum }}</span>
          人， 人大代表：
          <span>{{ detailInfo.responsiblePeopleNpcNum }}</span>
          人， 政协委员 ：
          <span>{{ detailInfo.responsiblePeopleCppccNum }}</span>
          人
        </td>
      </tr>
      <tr>
        <td colspan="2">
          本年度安排下岗人员 就业数：
          <span>{{ detailInfo.yearlyLaidOffEmploymentNum }}</span>
          人
        </td>
        <td colspan="8">
          本年度安排大学（ 含中高职）毕业生就业数：
          <span>{{ detailInfo.collegeGraduatesNum }}</span>
          人
        </td>
      </tr>
      <tr>
        <td colspan="2"> 专职工作人员签订聘用合同人数(人)</td>
        <td colspan="3"><span>{{ detailInfo.signFullTimeNum }}</span></td>
        <td colspan="2">专职工作人员参加社会保险人数(人)</td>
        <td colspan="3"><span>{{ detailInfo.insureFullTimeNum }}</span></td>
      </tr>
      <tr>
        <td colspan="2">失业保险（人）</td>
        <td colspan="1"><span>{{ detailInfo.unemploymentInsuranceNum }}</span></td>
        <td colspan="2">养老保险（人）</td>
        <td colspan="1"><span>{{ detailInfo.endowmentInsuranceNum }}</span></td>
        <td colspan="2">医疗保险（人）</td>
        <td colspan="2"><span>{{ detailInfo.medicalInsuranceNum }}</span></td>
      </tr>
      <tr>
        <td colspan="2">工伤保险（人）</td>
        <td colspan="1"><span>{{ detailInfo.industrialInjuryInsuranceNum }}</span></td>
        <td colspan="2">生育保险（人）</td>
        <td colspan="1"><span>{{ detailInfo.maternityInjuryInsuranceNum }}</span></td>
        <td colspan="2">住房公积金（人）</td>
        <td colspan="2"><span>{{ detailInfo.accumulationFundNum }}</span></td>
      </tr>
      <tr>
        <td rowspan="2" style="width: 10%;">类型/项目</td>
        <td rowspan="2">总人数</td>
        <td rowspan="2">中共党员</td>
        <td rowspan="2">志愿者人数</td>
        <td rowspan="2">累计志愿时间（小时）</td>
        <td rowspan="2">其中:女性人数</td>
        <td colspan="2">受教育程度</td>
        <td colspan="2">职业资格水平</td>
      </tr>
      <tr>
        <td>大学专科人数</td>
        <td>大学本科及以上人数</td>
        <td>助理社会工作师人数</td>
        <td>社会工作师人数</td>
      </tr>
      <tr>
        <td>全体工作人员</td>
        <td><span>{{ detailInfo.staffCount }}</span></td>
        <td><span>{{ detailInfo.partyMemberCount }}</span></td>
        <td><span>{{ detailInfo.volunteerCount }}</span></td>
        <td><span>{{ detailInfo.volunteerTimeCount }}</span></td>
        <td><span>{{ detailInfo.staffWomanCount }}</span></td>
        <td><span>{{ detailInfo.collegeDiplomaCount }}</span></td>
        <td><span>{{ detailInfo.undergraduateDegreeCount }}</span></td>
        <td><span>{{ detailInfo.assistantSocialWorkerCount }}</span></td>
        <td><span>{{ detailInfo.socialWorkerCount }}</span></td>
      </tr>
      <tr>
        <td>专职工作人员</td>
        <td><span>{{ detailInfo.fullTimeCount }}</span></td>
        <td><span>{{ detailInfo.fullTimePartyMemberCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeVolunteerCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeVolunteerTimeCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeWomanCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeCollegeDiplomaCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeUndergraduateDegreeCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeAssistantSocialWorkerCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeSocialWorkerCount }}</span></td>
      </tr>
      <tr>
        <td rowspan="2">类型/项目</td>
        <td colspan="4">年龄结构</td>
        <td colspan="6">{{ examineYear }}年度薪酬（万元/年）</td>
      </tr>
      <tr>
        <td>35岁及以下人数</td>
        <td>36岁至45岁人数</td>
        <td>46岁至55岁人数</td>
        <td>56岁以上人数</td>
        <td colspan="2">平均薪酬</td>
        <td colspan="2">最低薪酬</td>
        <td colspan="2">最高薪酬</td>
      </tr>
      <tr>
        <td>全体工作人员</td>
        <td><span>{{ detailInfo.ageHirtyFiveCount }}</span></td>
        <td><span>{{ detailInfo.ageHirtySixCount }}</span></td>
        <td><span>{{ detailInfo.ageFortySixCount }}</span></td>
        <td><span>{{ detailInfo.ageFiftySixCount }}</span></td>
        <td colspan="2"><span>{{ detailInfo.avgSalary }}</span></td>
        <td colspan="2"><span>{{ detailInfo.minSalary }}</span></td>
        <td colspan="2"><span>{{ detailInfo.maxSalary }}</span></td>
      </tr>
      <tr>
        <td>专职工作人员</td>
        <td><span>{{ detailInfo.fullTimeAgeHirtyFiveCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeAgeHirtySixCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeAgeFortySixCount }}</span></td>
        <td><span>{{ detailInfo.fullTimeAgeFiftySixCount }}</span></td>
        <td colspan="2"><span>{{ detailInfo.fullTimeAvgSalary }}</span></td>
        <td colspan="2"><span>{{ detailInfo.fullTimeMinSalary }}</span></td>
        <td colspan="2"><span>{{ detailInfo.fullTimeMaxSalary }}</span></td>
      </tr>
      <tr>
        <td class="td-head" rowspan="2" style="height: 100px;">本年度单位获奖情况</td>
        <td colspan="10">
          <p v-for="item in detailInfo.yearlyAwards">
            <span>{{ item.awardName }}</span>------<span>{{ dictToVal(dict1, item.awardlevel) }}</span>
          </p>
        </td>
      </tr>
    </table>
    <div class="msg-tip">
      <p>
        注：实体机构是指社会组织因自身业务活动和与其宗旨相适应的需要，举办的事业性实体、经济实体(可以投资设立企业法人，也可以设立非法人的经营机构)或者民办非企业单位。
      </p>
    </div>
  </div>
</template>

<script setup lang="ts">
import TbTitle from '@/views/yearCheck/components/TbTitle.vue'
import { reactive, ref, inject } from 'vue'
let detailInfo = reactive({})
import { getDictAll } from '@/api/dict/index'

const dict1 = ref([])
const examineYear = ref()

const { getDetailInfo } = inject('getDetailInfo')


let getDictInfo = () => {
  //获奖
  getDictAll('rewardLevel').then(res => {
    dict1.value = res.data
  })
}

const dictToVal = (dictList, val) => {
  for (let i = 0; i < dictList.length; i++) {
    if (val == dictList[i].id) {
      return dictList[i].name
    }
  }
}

getDetailInfo(2).then(res => {
  examineYear.value = res.examineYear
  res.data.yearlyAwards = JSON.parse(res.data.yearlyAwards)
  Object.assign(detailInfo, res.data)
})

getDictInfo()
</script>
<style lang="scss" scoped>
.msg-tip {
  padding: 20px 0;
  color: #000;
  font-family: '微软雅黑';
}
</style>
